package com.travel.travel_springboot_web.mapper;

import com.travel.travel_springboot_web.entity.Banner;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BannerMapper {
    @Select("SELECT id, image_url as imageUrl, '' as linkUrl, '' as title, " +
            "sort, 1 as status, created_at as createdAt, created_at as updatedAt " +
            "FROM goods_images ORDER BY id DESC LIMIT 3")
    List<Banner> findAllActive();
} 